package com.ztesoft.ossup.report.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.SequenceGenerator;

/**
 * Created by luxiang on 16/9/21.
 */
@Entity
public class Report implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -8673940879878702437L;

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "REPORT_SEQ")
	@SequenceGenerator(name = "REPORT_SEQ", sequenceName = "REPORT_SEQ")
	public Long id;

	@Column(nullable = false, length = 128)
	public String code;

	@Column(nullable = false, length = 128)
	public String name;

	// 10A 有效 10X无效
	@Column(nullable = false, length = 3)
	public String state;

	@Column(columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
	public Date createDate;

	@Column(columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
	public Date stateDate;

	@Column
	@Lob
	public String sql;

	// 是否总计 1:是 0:否
	@Column(length = 1)
	public String isSum;

	@Column
	@Lob
	public String remark;

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Date getStateDate() {
		return stateDate;
	}

	public void setStateDate(Date stateDate) {
		this.stateDate = stateDate;
	}

	public String getSql() {
		return sql;
	}

	public void setSql(String sql) {
		this.sql = sql;
	}

	public String getIsSum() {
		return isSum;
	}

	public void setIsSum(String isSum) {
		this.isSum = isSum;
	}

	@Override
	public String toString() {
		return "Report [id=" + id + ", code=" + code + ", name=" + name + ", state=" + state + ", createDate="
				+ createDate + ", stateDate=" + stateDate + ", sql=" + sql + ", isSum=" + isSum + "]";
	}

}
